//
//  PublishViewController.swift
//  Sina
//
//  Created by 沈方武 on 15/9/27.
//  Copyright © 2015年 沈方武. All rights reserved.
//

import UIKit

class PublishViewController: UITableViewController {
    
    var login : Bool = false
    
    var visitorView : VisitorView?
    override func loadView() {
        login ? super.loadView() : setupVisitorView()
    }
    

    func setupVisitorView() {
        visitorView = VisitorView()
        view = visitorView
        visitorView?.delegate = self
    }
  
}

extension PublishViewController : VisitorViewDelegat{
   
    func visitorViewDidloginButtonClick(view: VisitorView) {
        print("登陆")
    }
    
    func visitorViewDidRegistedButtonClick(view: VisitorView) {
        print("注册")
    }
    
    
}